package com.cyl.manager.pms.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.sincere.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 商品信息
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "pms_product")
public class Product {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("ID")
    private Long id;

    @TableField(value = "product_snapshot_id")
    private Long productSnapshotId;

    @TableField(value = "brand_id")
    private Long brandId;

    @TableField(value = "category_id")
    private Long categoryId;

    /**
     * 商品编码
     */
    @TableField(value = "out_product_id")
    private String outProductId;

    @TableField(value = "`name`")
    private String name;

    /**
     * 主图
     */
    @TableField(value = "pic")
    private String pic;

    /**
     * 画册图片，连产品图片限制为5张，以逗号分割
     */
    @TableField(value = "album_pics")
    private String albumPics;

    /**
     * 上架状态：0->下架；1->上架
     */
    @TableField(value = "publish_status")
    private Integer publishStatus;

    /**
     * 排序
     */
    @TableField(value = "sort")
    private Integer sort;

    @TableField(value = "price")
    private BigDecimal price;

    /**
     * 单位
     */
    @TableField(value = "unit")
    private String unit;

    /**
     * 商品重量，默认为克
     */
    @TableField(value = "weight")
    private BigDecimal weight;

    /**
     * 产品详情网页内容
     */
    @TableField(value = "detail_html")
    private String detailHtml;

    /**
     * 移动端网页详情
     */
    @TableField(value = "detail_mobile_html")
    private String detailMobileHtml;

    /**
     * 品牌名称
     */
    @TableField(value = "brand_name")
    private String brandName;

    /**
     * 商品分类名称
     */
    @TableField(value = "product_category_name")
    private String productCategoryName;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private Long createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 修改人
     */
    @TableField(value = "update_by")
    private Long updateBy;

    /**
     * 修改时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     * 商品销售属性，json格式
     */
    @TableField(value = "product_attr")
    private String productAttr;

    /**
     * 删除标志
     */
    @TableField(value = "deleted")
    @ApiModelProperty("删除标志状态")
    @TableLogic
    private Boolean deleted;

    public static final String COL_ID = "id";

    public static final String COL_PRODUCT_SNAPSHOT_ID = "product_snapshot_id";

    public static final String COL_BRAND_ID = "brand_id";

    public static final String COL_CATEGORY_ID = "category_id";

    public static final String COL_OUT_PRODUCT_ID = "out_product_id";

    public static final String COL_NAME = "name";

    public static final String COL_PIC = "pic";

    public static final String COL_ALBUM_PICS = "album_pics";

    public static final String COL_PUBLISH_STATUS = "publish_status";

    public static final String COL_SORT = "sort";

    public static final String COL_PRICE = "price";

    public static final String COL_UNIT = "unit";

    public static final String COL_WEIGHT = "weight";

    public static final String COL_DETAIL_HTML = "detail_html";

    public static final String COL_DETAIL_MOBILE_HTML = "detail_mobile_html";

    public static final String COL_BRAND_NAME = "brand_name";

    public static final String COL_PRODUCT_CATEGORY_NAME = "product_category_name";

    public static final String COL_CREATE_BY = "create_by";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_BY = "update_by";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_PRODUCT_ATTR = "product_attr";

    public static final String COL_DELETED = "deleted";
}